Add support for listing workflows for all users#104
Conversation
daniel-thom
commented
Feb 6, 2026
- Adds support for listing workflows for all users
- Fixes bug that caused jobs to sometimes not start when job runtimes matched slurm walltime values.
- Fixes bug that allowed invalid Slurm job IDs to get stored in the database, which prevented workflows from being reinitialized.
A user's workflow didn't run because it took more than 60 seconds for the torc job runner to fully initialize.
There was a problem hiding this comment.
Pull request overview
This PR adds support for listing workflows from all users via a new --all-users CLI flag, and fixes two important bugs related to Slurm job scheduling. When access control is enabled, the --all-users flag respects access permissions, showing only workflows the authenticated user can access (owned or group-shared). The PR also increases the default compute node expiration buffer from 60 to 180 seconds and enforces a minimum of 120 seconds to prevent jobs from failing to start when their runtimes closely match Slurm walltime values. Additionally, it fixes a critical bug where invalid Slurm job IDs (placeholder value 0) could be stored in the database by reordering the database record creation to occur only after successful Slurm job submission.
Changes:
- Added
--all-usersflag to workflows list command with proper access control integration - Increased default compute node expiration buffer from 60 to 180 seconds with 120-second minimum
- Fixed Slurm job submission to store valid job IDs by creating database records after successful submission
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| torc-slurm-job-runner/src/main.rs | Updated default expiration buffer to 180 seconds and added 120-second minimum enforcement |
| torc-server/src/server.rs | Added access control logic to list_workflows endpoint to filter by accessible workflow IDs |
| tests/test_workflows.rs | Added test for workflows list --all-users without authentication |
| tests/test_access_groups.rs | Added comprehensive test for workflows list --all-users with access control enabled |
| src/server/api/workflows.rs | Implemented new list_workflows_filtered method with access control support and refactored existing list_workflows to use it; updated default buffer to 180 seconds |
| src/models.rs | Updated default compute_node_expiration_buffer_seconds to 180 |
| src/client/commands/workflows.rs | Added --all-users flag, WorkflowTableRow struct, and display logic for all-users workflow listing |
| src/client/commands/slurm.rs | Fixed bug by creating scheduled compute node records only after successful Slurm job submission with valid job IDs |
| julia_client/Torc/src/api/models/model_WorkflowModel.jl | Updated default compute_node_expiration_buffer_seconds to 180 |
| api/openapi.yaml | Updated default compute_node_expiration_buffer_seconds to 180 in API specification |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.